<template>
<div class="box">
    <div class="head">
        <div class="card">

            <div class="actor">
                <img style="width:60px;border:5px solid #4eb5ff;border-radius:100px" :src="info.avatar" alt="">
                <div class="info">
                    <div style="font-size:18px;font-weight:600;margin-bottom:6px">{{info.customerName||""}}</div>
                    <div style="font-size:12px">卡号:{{customerCardNo}}</div>
                </div>

            </div>

            <div class="infos">
                <div class="item">
                    <div>所属咨询:{{consultant}}</div>
                    <div style="margin-top:8px">登记电话:{{customer_mobile}}</div>
                </div>
                <div class="item">
                    <div>开发人:{{developer}}</div>
                    <div style="margin-top:8px">登记时间:{{regist_date}}</div>
                </div>

            </div>

        </div>

    </div>

    <van-cell @click="jumpPreference" style="margin-top:96px" title="立即预约" />

    <van-cell @click="jumpRecord" style="margin-top:8px" title="预约记录" />

    <float-icons padding="10 0 60 0" class="icons-warp">
        <div class="float-icon-item">
            <img src="../../assets/dargIcon/back.png" alt="" @click="handleIcons('/home')" />
            <span>返回</span>
        </div>
        <!-- <div class="float-icon-item">
            <img src="../../assets/dargIcon/cart-icon.png" alt="" @click="handleIcons('/cart')" />
            <span>购物车</span>
        </div> -->
    </float-icons>

</div>
</template>

<script>
import FloatIcons from '@/components/s-icons'
import {
    toast
} from "../../utils/toast.js"
import {
    isbind
} from "../isCheckBind.js"
import {
    Toast
} from 'vant'
export default {
    name: "noninvasive",
    components: {
        FloatIcons
    },
    data() {
        return {

            info: {},
            customerCardNo: "",
            consultant: "",
            developer: "",
            customer_mobile: "",
            regist_date: ""

        }
    },
    mounted() {
        isbind()

        localStorage.removeItem("preferenceInfo")
        this.info = JSON.parse(localStorage.getItem("obj")) || {}
        this.consultant = localStorage.getItem("consultant") || "暂无"
        this.developer = localStorage.getItem("developer") || "暂无"
        this.customerCardNo = localStorage.getItem("customerCardNo") || ""
        this.customer_mobile = localStorage.getItem("customer_mobile") || ""
        this.regist_date = localStorage.getItem("regist_date") || ""
    },
    methods: {
        jumpRecord() {
            toast({
                message: "即将上线,敬请期待!",
                time: 2000
            })
        },
        jumpPreference() {
            this.$router.replace({
                path: "/preferenceItems"
            })
        },
        handleIcons(id) {

            this.$router.replace({
                path: "/memberCenter"
            })
        },
    }
}
</script>

<style lang="scss" scoped>
@import './index.scss';

.box {
    width: 100%;

    .icons-warp {
        // border-radius: 25px;
        border-radius: 25px 0 0 25px;

        .float-icon-item {
            display: flex;
            flex-direction: row;
            // padding-left: 14px;
            // padding-right: 14px;
            align-items: center;
            justify-content: center;
            position: relative;
            width: 80px;
            height: 40px;

            img {
                width: 25px;
                height: 25px;
                margin-bottom: 3px;
            }

            span {
                margin-left: 5px;
                font-size: 12px;
                color: #666666;
            }
        }
    }
}
</style>
